package com.hb.umsp.contraller;

import com.hb.umsp.entity.HbExamUserDetail;
import com.hb.umsp.service.ExamUserService;
import com.hb.umsp.util.JsonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

@CrossOrigin("*")
@RestController
@RequestMapping("/examuser")
public class ExamUserContraller {

    @Autowired
    ExamUserService examUserService;


    public JsonResult createUserExam(@RequestBody List<HbExamUserDetail> hbExamUserDetail,
                                     HttpServletRequest request){


        String token = request.getHeader("token");

        examUserService.createUserExam(hbExamUserDetail,token);

        return new JsonResult("000000","生成成功");

    }


}
